import { createRouter, createWebHistory, RouteRecordRaw } from "vue-router";

const routes: Array<RouteRecordRaw> = [
  {
    path: "/",
    name: "首页",
    component: () => import("../views/Index.vue"),
    meta: {
      title: "雷石淘券券",
      isNav: true,
      keepAlive: true,
    },
  },
  {
    path: "/Login",
    name: "Login",
    component: () => import("../views/Login.vue"),
  },
  {
    path: "/:catchAll(.*)",
    name: "404",
    component: () => import("../views/404.vue"),
  },
  {
    path: "/home/Check",
    name: "Check",
    component: () => import("../views/Check.vue"),
    meta: {
      title: "雷石淘券券",
      keepAlive: true,
      isNav: true,
      father: "首页",
    },
  },
  {
    path: "/home/home2",
    name: "home2",
    component: () => import("../views/Check.vue"),
    meta: {
      title: "雷石淘券券",
      keepAlive: true,
      isNav: true,
      father: "首页",
    },
  },
];

const router = createRouter({
  history: createWebHistory(process.env.BASE_URL),
  routes,
});

export default router;
